<template>
  <div>
    {{props.user1}}
  </div>
  <div>
    {{props.msg}}
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue'
//在组合式api中使用defineProps函数 返回props对象
const props = defineProps(['user1', 'msg']);
console.log(props.user1);
console.log(props.msg);
let username = ref("zhangsan")
console.log("-----------this:", this);
const fn1 = () => {
  console.log("----------------fn1");
}
const emits = defineEmits();
const book = reactive({ name: 'h5', price: 200 })
emits("submitFn", book);
defineExpose({
  fn1,
  username
})

</script>

<style  scoped>
</style>